package com.bps.zzant.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;


import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;



import static javax.persistence.GenerationType.IDENTITY;

@Entity
@Table(name = "todolist")

public class ToDo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1488301711930043131L;

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "todo_id", unique = true, nullable = false)
	private int id;
	
	@Column(name = "todo_due")
	@DateTimeFormat(pattern="MM/dd/YYYY")
	private Date dueDate;
	
	@Column(name = "todo_created")
	private Date createdDate;
	
	@Column(name = "todo_desc")
	@NotEmpty(message = "The Description must not be blank.")
	private String desc;
	
	@Column(name = "todo_priority")
	@NotEmpty
	private String priority;
	
	@Column(name = "todo_status")
	private String status;
	
	@Column(name = "order_id")
	private String orderId;
	
	@Column(name = "owner")
	@NotEmpty
	private String owner;
	
	@Column(name = "finish_date")
	private Date finishDate;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Date getDueDate() {
		return dueDate;
	}

	public void setDueDate(Date dueDate) {
		this.dueDate = dueDate;
	}

	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getPriority() {
		return priority;
	}

	public void setPriority(String priority) {
		this.priority = priority;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	public Date getFinishDate() {
		return finishDate;
	}

	public void setFinishDate(Date finishDate) {
		this.finishDate = finishDate;
	}
	
	
	
}
